<!DOCTYPE html>
<html>

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>湖南大学教育阳光服务网上大厅</title>
    <link href="https://cdn.bootcss.com/font-awesome/4.7.0/css/font-awesome.min.css" rel="stylesheet">
    <link href="../css/common.css" rel="stylesheet">
    <link href="../css/index.css" rel="stylesheet">
</head>

<body>
    <header>
        <a href="../index.html"><img src="../img/head_title.png" alt="logo" class="logo"></a>
        <ul>
            <li>
                <i class="fa fa-book"></i>
                <h3>办事指南</h3>
                <a href="http://hdsw.hnu.edu.cn/">点击进入</a>
            </li>
            <li>
                <i class="fa fa-bank"></i>
                <h3>政策咨询</h3>
                <a href="/module/form.consulting.html">点击进入</a>
            </li>
            <li>
                <i class="fa fa-envelope"></i>
                <h3>信息公开</h3>
                <a href="http://xxgk.hnu.edu.cn/">点击进入</a>
            </li>
            <li>
                <i class="fa fa-commenting"></i>
                <h3>投诉受理</h3>
                <a href="/module/form.complaints.html">点击进入</a>
            </li>
            <li>
                <i class="fa fa-users"></i>
                <h3>舆情回应</h3>
                <a href="/module/form.feedback.html">点击进入</a>
            </li>
        </ul>
    </header>

    <table width="998" border="0" align="center" cellpadding="0" cellspacing="0">
        <tbody>
            <tr>
                <td align="left" valign="top" width="2" height="700">

                </td>
                <td width="998" valign="top">
                    <table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
                        <tbody>
                            <tr>
                                <td valign="top">
                                    <table width="100%" border="0" cellspacing="0" cellpadding="0">
                                        <tbody>
                                            <tr>
                                                <td width="100%" height="19" style="border-bottom:1px #cccccc solid">
                                                    <table width="580" border="0" cellspacing="0" cellpadding="0">
                                                        <tbody>
                                                            <tr>
                                                                <td width="33" align="center">
                                                                    <img src="../img/list_bg3.jpg" width="14" height="15">
                                                                </td>
                                                                <td width="301" height="18" style="color:#1891CB;font-size:14px">

                                                                </td>
                                                                <td width="446" align="right">&nbsp;</td>
                                                            </tr>
                                                        </tbody>
                                                    </table>
                                                </td>
                                            </tr>

                                            <tr>
                                                <td style="padding:10px">
                                                    <table id="contentTable" width="100%" border="0" cellspacing="0" cellpadding="0">
                                                        <tbody>
                                                        </tbody>
                                                    </table>
                                                </td>
                                            </tr>
                                        </tbody>
                                    </table>
                                </td>

                            </tr>
                        </tbody>
                    </table>
                </td>
            </tr>
        </tbody>
    </table>


</body>
<script src="https://cdn.bootcss.com/jquery/3.2.1/jquery.min.js"></script>
<script src="https://cdn.bootcss.com/handlebars.js/4.0.10/handlebars.min.js"></script>
<script src="https://cdn.bootcss.com/jquery-cookie/1.4.1/jquery.cookie.min.js"></script>
<script src="../HOST.js"></script>
<script>
    function getUrl(target) {
      switch (target) {
        case 'PRAISE':
          return '/information/praise';
        case 'MOMENT':
          return '/article/moment';
        case 'HOTQUESTION':
          return '/article/hotQuestion';
        default:
          return '';
      }
    }
    function getUrlHead(target) {
      switch (target) {
        case 'PRAISE':
          return './page.information.html?id=';
        case 'MOMENT':
          return '/article?id=';
        case 'HOTQUESTION':
          return '/article?id=';
        default:
          return '';
      }
    }
    var url = new URL(window.location.href);
    $.ajax({
      url: Host + getUrl(url.searchParams.get("t")),
      type: "get",
      data: null,
      success: function (msg, data) {
        var urlHead = getUrlHead(url.searchParams.get("t"));
        msg.data.forEach(function (e) {
          var item = '';
          var date = new Date(e.created_date).toLocaleDateString();
          item += '<tr>'+
                  '<td width=\"3%\" height=\"30\">'+
                  '<img src=\"../img/list_bg2.jpg\" width=\"8\" height=\"7\">'+
                  '</td>'+
                  '<td width=\"70%\">'+
                  '<a href=\"'+urlHead+e.id+'\" target=\"_blank\">'+e.title+'</a>'+
                  '</td>'+
                  '<td width=\"22%\" align=\"center\">'+date+'</td>'+
                  '</tr>';
          jQuery("#contentTable").append(item);
        });
      }
    });
</script>
</html>